package com.example.demo.entity.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Collections;
import java.util.List;

@ApiModel("分页查询结果")
public class PageResult<T> implements Serializable {

    @ApiModelProperty(value = "结果数据")
    private List<T> records = Collections.emptyList();

    @ApiModelProperty(name = "total",value = "总条数")
    private long total = 0;

    @ApiModelProperty(name = "pageSize",value = "每页条数")
    private long size = 10;

    @ApiModelProperty(name = "pageNum",value = "当前页")
    private long current = 1;

    @ApiModelProperty(name = "pages",value = "总页数")
    private long pages;

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public long getCurrent() {
        return current;
    }

    public void setCurrent(long current) {
        this.current = current;
    }

    public long getPages() {
        return pages;
    }

    public void setPages(long pages) {
        this.pages = pages;
    }
}